package com.jason.auto.controller;

import com.jason.auto.common.GeneralResult;
import com.jason.auto.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("role")
public class RoleController {

    @Autowired
    private RoleService roleService;

    @GetMapping("list")
    public GeneralResult getRoleList() {
        GeneralResult result = new GeneralResult();
        result.setData(roleService.findAll());
        return result;
    }
}